package com.ruoyi.shop.common.constant;

/**
 * @Author: JinChen Zhu
 * @CreateTime: 2024-05-22  14:49
 */
public interface Constants {
    //状态常量
    String STATUS_NORMAL = "0";//正常
    String STATUS_DISABLE = "1";//停用

    // Minio常量
    int TEMP_FILE_EXPIRATION = 60 * 60 * 24; //临时文件过期时间: 1天

    // Redis
    String ACCESS_TOKEN = "ACCESS:TOKEN"; //访问令牌

    String UP_SET_PREFIX = "UP:SET:"; //用户商品映射SET前缀
    String RECOMMEND_UP_PREFIX = "RECOMMEND:UP:"; //用户推荐商品SET前缀
    String TOTAL_PRODUCT_COUNT = "PRODUCT:COUNT";

    String PRODUCT_CATEGORY_RANK = "PRODUCT:CATEGORY:RANK"; //商品分类排行榜
    String PRODUCT_ITEM_PREFIX = "PRODUCT:ITEM:"; //商品分类详情

    // MongoDB
    String NOTICE_COLLECTION = "message"; //通知集合


    //websocket相关
    String SESSION_TOKEN_KEY = "SESSION_TOKEN_KEY";
    String HEADER_ACCOUNT_KEY = "X_ACCOUNT_KEY";
    String SESSION_TOKEN_PREFIX = "SESSION_TOKEN_";
    String ACCOUNT_TOKEN_PREFIX = "ACCOUNT_TOKEN_";


    /**
     * 订单超时的时间的设置, ms为单位
     */
    Long ORDER_EXPIRE = 10 * 1000L;

    /**
     * websocket懒加载用户信息
     */
    String USER_INFO = "USER_INFO:";

}
